<template>
    <div class="print-table">
        <el-table :data="list" border stripe class="mt-10">
            <el-table-column align="center" prop="portName" label="作业港口" min-width="90"></el-table-column>
            <el-table-column align="center" prop="containerId" label="箱号" min-width="130"></el-table-column>
            <el-table-column align="center" prop="containerSize" label="尺寸" min-width="60"></el-table-column>
            <el-table-column align="center" prop="containerType" label="箱型" min-width="60"></el-table-column>
            <el-table-column align="center" prop="tradeType" label="内外贸" min-width="90">
                <template slot-scope="scope">
                    {{ scope.row.tradeType | _filterTradeType }}
                </template>
            </el-table-column>
            <el-table-column align="center" prop="imOrEx" label="进出口" min-width="80"></el-table-column>
            <el-table-column align="center" prop="sealNo" label="铅封号" min-width="130"></el-table-column>
            <el-table-column align="center" prop="finishTime" label="施封日期" min-width="155"></el-table-column>
            <el-table-column align="center" prop="tallyPlanType" label="作业类型" min-width="90"></el-table-column>
            <el-table-column align="center" prop="accountUnit" label="结算单位" min-width="155"></el-table-column>
        </el-table>
    </div>
</template>

<script>
    import { getBalanceSpecialDetailList } from "@/api/balance/balance";

    export default {
        name: "sp",
        data() {
            return {
                list:[]
            }
        },
        created() {
            this.loadData()
        },
        methods: {
            loadData(){
                const id=this.$route.query.params
                console.log(id)
                getBalanceSpecialDetailList(JSON.parse(id)).then(res => {
                    this.list = res.data.aaData
                    this.$nextTick(()=>{
                        window.print()
                        window.close();
                    })
                })
            }
        }
    }
</script>

